package com.wenwu.service;

import java.util.List;
import java.util.Map;

import com.wenwu.common.bean.RoleResources;
import com.wenwu.common.bean.User;
import com.wenwu.common.exception.RelicsException;
import com.wenwu.common.page.PaginationVO;

/**
 * @project ATHome-Manager-Service
 * @class UserService.java
 * @author zhujiagui E-mail:<zhujiagui@zkingsoft.com>
 * @date 2015年2月10日 下午1:10:14
 * @description 用户模块service层
 */
public interface UserService {
	int selectTotalRecord(User user, PaginationVO pageVo)
			throws RelicsException;

	List<User> selectUserList(User user, PaginationVO pageVo)
			throws RelicsException;

	int addUser(User user) throws RelicsException;

	int updateUser(User user) throws RelicsException;

	int selectUserByJobNo(String jobno) throws RelicsException;

	int deleteUserByKey(List<?> keys) throws RelicsException;

	User selectUserByKey(Integer userId) throws RelicsException;

	int resetPassword(String newpassword, Integer userId)
			throws RelicsException;

	int updateUserLock(String locked, Integer userId) throws RelicsException;

	/**
	 * 登录验证
	 * 
	 * @param user
	 * @return
	 */
	public User doLogin(User user) throws RelicsException;

	// 根据用户角色信息获取角色资源信息
	public Map<String, List<RoleResources>> getRoleResourceByRoleid(User user)
			throws RelicsException;

	// 更新密码
	String updatePwd(User user) throws RelicsException;
}
